{% if page.related_posts %}
<div class="related">
  <h2>Related Posts</h2>
  <ul class="related-posts">
    {% for post in page.related_posts limit:3 %}
    <li>
      <h3>
        <a href="{{ post.url }}">
          {{ post.title }}
          <small>{{ post.date | date_to_string }}</small>
        </a>
      </h3>
    </li>
    {% endfor %}
  </ul>
</div>
{% endif %}
